package server

import (
	"github.com/golang/glog"
	"github.com/oikomi/FishChatServer2/conf_discovery/etcd"
	"github.com/oikomi/FishChatServer2/server/logic/conf"
)

type Server struct {
}

func New() (s *Server) {
	s = &Server{}
	return
}

func (s *Server) SDHeart() {
	glog.Info("SDHeart")
	glog.Info(conf.Conf.ConfDiscovery.Logic.Name)
	work1 := etcd.NewWorker(conf.Conf.ConfDiscovery.Logic.Name, conf.Conf.Server.Addr, conf.Conf.ConfDiscovery.Logic.Root,
		conf.Conf.ConfDiscovery.Logic.Addrs)
	go work1.HeartBeat()

}
